<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改遥感数据管理')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-data-edit" th:object="${resiData}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="date" th:value="${#dates.format(resiData.date, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">纬度：</label>
                <div class="col-sm-8">
                    <input name="latitude" th:field="*{latitude}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">经度：</label>
                <div class="col-sm-8">
                    <input name="longitude" th:field="*{longitude}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">Band 2 (blue) surface reflectance：</label>
                <div class="col-sm-8">
                    <input name="srB2" th:field="*{srB2}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">Band 3 (green) surface reflectance：</label>
                <div class="col-sm-8">
                    <input name="srB3" th:field="*{srB3}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">Band 4 (red) surface reflectance：</label>
                <div class="col-sm-8">
                    <input name="srB4" th:field="*{srB4}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">Band 5 (near infrared) surface reflectance：</label>
                <div class="col-sm-8">
                    <input name="srB5" th:field="*{srB5}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">Band 6 (shortwave infrared 1) surface reflectance：</label>
                <div class="col-sm-8">
                    <input name="srB6" th:field="*{srB6}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">Band 7 (shortwave infrared 2) surface reflectance：</label>
                <div class="col-sm-8">
                    <input name="srB7" th:field="*{srB7}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">Band 10 surface temperature：</label>
                <div class="col-sm-8">
                    <input name="stB10" th:field="*{stB10}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">绿度指数：</label>
                <div class="col-sm-8">
                    <input name="NDVI" th:field="*{NDVI}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">湿度指数：</label>
                <div class="col-sm-8">
                    <input name="WET" th:field="*{WET}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">干度指数：</label>
                <div class="col-sm-8">
                    <input name="NDBSI" th:field="*{NDBSI}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">热度指数：</label>
                <div class="col-sm-8">
                    <input name="LST" th:field="*{LST}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">遥感生态指数：</label>
                <div class="col-sm-8">
                    <input name="RESI" th:field="*{RESI}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/data";
        $("#form-data-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-data-edit').serialize());
            }
        }

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>